package LearnAlgorithm.a_eclipseHello;

/**
 * @version: 1.0
 * @Author: wuqiu
 * @date: 2023-07-17 19:18
 * @description: LeetcodeLearnAlgorithm -> LearnAlgorithm.a_eclipseHello
 */
public class test5 {
    public static void main(String[] args) {
        test5 test5 = new test5();
        System.out.println(test5.countOfNumNo3In999999());
    }

    /**
     * 100 * 1 +
     * 10 * 9 +
     * 9 * 9 =
     * 271个
     *
     * 1000 * 1 +
     * 100 * 9 +
     * 10 * 9 * 9 +
     * 1 * 9 * 9 * 9 =
     * 3,439个
     * @return
     */
    public int countOfNumNo3In999999() {
        int count = 0;
        for (int i = 0; i < 10000; i++) {
            String s = "" + i;
            if (!s.contains("3")) {//271个
                count++;
            }
        }
        return count;
    }
}
